<?php foreach ( $images as $image ) : ?>
		<a href="<?php echo $image->ngg_custom_fields["URL"]; ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
			<?php if ( !$image->hidden ) { ?>
			<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->imageURL ?>" />
			<?php } ?>
		</a>
<?php endforeach; ?>